package com.jgp.workflow.exception;

import com.jgp.common.exception.ErrorCode;

/**
 * 项目   jgp-cloud-parent
 * 作者   loufei
 * 时间   2018/12/22
 */
public enum WorkflowErrorCode implements ErrorCode {
    NO_CURRENT_USER("10001","无法获取当前操作员！"),
    SAVE_MODEL_EDITOR_FAIL("10002","流程编辑器保存失败！"),
    SAVE_MODEL_FAIL("10003","流程模型保存失败！"),
    QUERY_MODEL_FAIL("10004","查询模型失败！"),
    JSON_VARIABLE_FORMAT_FAIL("10005","JSON变量格式化失败！"),
    PROC_START_FAIL("10006","流程已经启动！"),
    PROC_INVALID("10007","无效流程！"),
    TASK_ALREADY_CLAIMED("10008","任务已签收，无法重复签收！"),
    TASK_NOT_FOUND("10009","无效任务！");
    
    private String code;
    private String msg;
    
    WorkflowErrorCode(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    
    @Override
    public String getCode() {
        return code;
    }
    
    @Override
    public String getMsg() {
        return msg;
    }
}
